TargetDomain

class TargetDomain : Domain

Supports additional targets discovery and allows to attach to them.

Functions

activateTarget
Link copied to clipboard
fun activateTarget(input: ActivateTargetRequest): Single<RequestResponseFrame>
Activates (focuses) the target.
attachedToTarget
Link copied to clipboard
fun attachedToTarget(): Flowable<AttachedToTargetEvent>
Issued when attached to target because of auto-attach or attachToTarget command.
attachToBrowserTarget
Link copied to clipboard
fun attachToBrowserTarget(): Single<AttachToBrowserTargetResponse>
Attaches to the browser target, only uses flat sessionId mode.
attachToTarget
Link copied to clipboard
fun attachToTarget(input: AttachToTargetRequest): Single<AttachToTargetResponse>
Attaches to the target with given id.
closeTarget
Link copied to clipboard
fun closeTarget(input: CloseTargetRequest): Single<CloseTargetResponse>
Closes the target.
createBrowserContext
Link copied to clipboard
fun createBrowserContext(input: CreateBrowserContextRequest): Single<CreateBrowserContextResponse>
Creates a new empty BrowserContext.
createTarget
Link copied to clipboard
fun createTarget(input: CreateTargetRequest): Single<CreateTargetResponse>
Creates a new page.
description
Link copied to clipboard
fun description(): String
Returns domain description.
detachedFromTarget
Link copied to clipboard
fun detachedFromTarget(): Flowable<DetachedFromTargetEvent>
Issued when detached from target for any reason (including detachFromTarget command).
detachFromTarget
Link copied to clipboard
fun detachFromTarget(input: DetachFromTargetRequest): Single<RequestResponseFrame>
Detaches session with given id.
disposeBrowserContext
Link copied to clipboard
fun disposeBrowserContext(input: DisposeBrowserContextRequest): Single<RequestResponseFrame>
Deletes a BrowserContext.
events
Link copied to clipboard
fun events(): Flowable<Event>
Returns flowable capturing all domains events.
fun events(filter: Predicate<Event>): Flowable<Event>
Returns flowable capturing all domains events matching predicate.
fun <T : Event> events(eventClass: Class<T>): Flowable<T>
Returns flowable capturing all domain events of a given type.
fun <T : Event> events(eventClass: Class<T>, filter: Predicate<T>): Flowable<T>
Returns flowable capturing all domain events of a given type matching predicate.
exposeDevToolsProtocol
Link copied to clipboard
fun exposeDevToolsProtocol(input: ExposeDevToolsProtocolRequest): Single<RequestResponseFrame>
Inject object to the target's main frame that provides a communication channel with browser target.
getBrowserContexts
Link copied to clipboard
fun getBrowserContexts(): Single<GetBrowserContextsResponse>
Returns all browser contexts created with Target.createBrowserContext method.
getDependencies
Link copied to clipboard
open fun getDependencies(): List<Domain>
Returns domain dependencies.
getTargetInfo
Link copied to clipboard
fun getTargetInfo(input: GetTargetInfoRequest): Single<GetTargetInfoResponse>
Returns information about a target.
getTargets
Link copied to clipboard
fun getTargets(): Single<GetTargetsResponse>
Retrieves a list of available targets.
name
Link copied to clipboard
fun name(): String
Returns domain name.
receivedMessageFromTarget
Link copied to clipboard
fun receivedMessageFromTarget(): Flowable<ReceivedMessageFromTargetEvent>
Notifies about a new protocol message received from the session (as reported in attachedToTarget event).
sendMessageToTarget
Link copied to clipboard
fun sendMessageToTarget(input: SendMessageToTargetRequest): Single<RequestResponseFrame>
Sends protocol message over session with given id.
setAutoAttach
Link copied to clipboard
fun setAutoAttach(input: SetAutoAttachRequest): Single<RequestResponseFrame>
Controls whether to automatically attach to new targets which are considered to be related to this one.
setDiscoverTargets
Link copied to clipboard
fun setDiscoverTargets(input: SetDiscoverTargetsRequest): Single<RequestResponseFrame>
Controls whether to discover available targets and notify via targetCreated/targetInfoChanged/targetDestroyed events.
setRemoteLocations
Link copied to clipboard
fun setRemoteLocations(input: SetRemoteLocationsRequest): Single<RequestResponseFrame>
Enables target discovery for the specified locations, when setDiscoverTargets was set to true.
targetCrashed
Link copied to clipboard
fun targetCrashed(): Flowable<TargetCrashedEvent>
Issued when a target has crashed.
targetCreated
Link copied to clipboard
fun targetCreated(): Flowable<TargetCreatedEvent>
Issued when a possible inspection target is created.
targetDestroyed
Link copied to clipboard
fun targetDestroyed(): Flowable<TargetDestroyedEvent>
Issued when a target is destroyed.
targetInfoChanged
Link copied to clipboard
fun targetInfoChanged(): Flowable<TargetInfoChangedEvent>
Issued when some information about a target has changed.

Sources

jvm source
Link copied to clipboard